﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Inbox.aspx.cs" Inherits="Enterprise.UI.Web.Modules.WebEmail.Inbox" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" type="text/css" href="../../Styles/css/ssec-form.css"/>
     <link rel="stylesheet" type="text/css" href="../../Styles/css/gridview.css" />
     <script type="text/javascript">
         function selectAll() {
             //获取所有MainPH_GridView1_CheckBox1_开头的checkbox
             $("input[id^='MainPH_GridView1_cb_select']").attr("checked", "true");
         }
         function unselectAll() {
             $("input[id^='MainPH_GridView1_cb_select']").removeAttr("checked");
         }
     </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPH" runat="server">
    <div class="toolbars">       
       <a href="Inbox.aspx"  class="easyui-linkbutton" iconCls="icon-toolbar" plain="true">收件箱</a>
       <a href="OutBox.aspx"  class="easyui-linkbutton" iconCls="icon-toolbar" plain="true">发件箱</a>
       <a href="AddNew.aspx"  class="easyui-linkbutton" iconCls="icon-toolbar" plain="true">写邮件</a>
       <a href="Setting.aspx"  class="easyui-linkbutton" iconCls="icon-toolbar" plain="true">邮箱设置</a>              
   </div> 
   <div id="contents"  class="ssec-form">
       <div class="ssec-group ssec-group-hasicon"><img src="../../easyui1.2.6/themes/icons/application.png" alt=""/><span>收件箱<asp:Label runat="server" ID="lb_count"></asp:Label></span></div>  
       <div>
           <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="GridViewStyle" 
               DataKeyNames="MessageId" EnablePersistedSelection="True" Width="100%" 
               onrowdatabound="GridView1_RowDataBound">
           <Columns>
                <asp:TemplateField>
                <ItemTemplate>
                    <asp:CheckBox ID="cb_select" runat="server" />
                </ItemTemplate>
                <ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
            </asp:TemplateField>
                <asp:BoundField DataField="EmailFrom" HeaderText="From" >
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>                
                <asp:HyperLinkField DataNavigateUrlFields="MessageId" 
                    DataNavigateUrlFormatString="emailDetail.aspx?id={0}" 
                    DataTextField="EmailSubject" HeaderText="主题" >
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:HyperLinkField>
                <asp:BoundField DataField="EmailDate" HeaderText="Date" />
                <asp:BoundField DataField="EmailSize" HeaderText="EmailSize" />               
                <asp:BoundField DataField="MessageId" />
                <asp:BoundField DataField="READED" />                
                </Columns>
                <HeaderStyle CssClass="GridViewHeaderStyle" />
                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                <RowStyle CssClass="GridViewRowStyle" />
                <PagerSettings FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PageButtonCount="5"
                    PreviousPageText="上一页" />
                <PagerStyle CssClass="GridViewPagerStyle" />
           </asp:GridView>
       </div>       
       <div style="padding-top:8px;">
       &nbsp;<a id="btn_SelectAll" runat="server" class="easyui-linkbutton" onclick="selectAll();"  >全选</a>
        <a id="btn_Cancel" class="easyui-linkbutton" onclick="unselectAll();" >取消全选</a>
        &nbsp;<asp:LinkButton ID="btn_Delete" runat="server" Text="删除" 
               OnClientClick="return confirm('Are you Sure?')"  CssClass="easyui-linkbutton" 
               onclick="btn_Delete_Click" /> 
               <asp:LinkButton ID="btn_Readed" runat="server" Text="标记为已读" 
               CssClass="easyui-linkbutton" onclick="btn_Readed_Click"/>
        </div>
   </div>
</asp:Content>
